
for i in  range(1,10):
    for j in range(1,i + 1):
        print("{} * {} = {:<4}".format(j,i,i*j),end=" ")
    print("")
    
print("=="*40)

for i in  range(9,0,-1):
    for j in range(1,i + 1):
        print("{} * {} = {:<4}".format(j,i,i*j),end=" ")
    print("")
    
print("=="*40)

i = 1
while i < 10:
    j = 1
    while j <= i:
        print("{} * {} = {:<4}".format(j,i,i*j),end=" ")
        j += 1
    print("")
    i += 1

print("=="*40)

i = 9
while i > 0:
    j = 1
    while j <= i:
        print("{} * {} = {:<4}".format(j,i,i*j),end=" ")
        j += 1
    print("")
    i -= 1
print("=="*40)



for i in range(1,10):
    for j in range(1,10):
        print ("{}*{}={:<4}".format (i,j,i*j),end=" ") #不换行
    print ("")

print("=="*40)


i = 1
while i < 10:
    j = 1
    while j <10:
        print ("{}*{}={:<4}".format (i,j,i*j),end=" ") #不换行
        j += 1
    i+=1
    print("")


print("=="*40)

for i in range(1,10):
    for k in range(1,i):
        print (end="      "),
    for j in range(i,10):
        print ("%d*%d=%2d"%(i,j,i*j),end=" ")
    print ("")


print("=="*40)
for i in range(1,10):
    for k in range(1,10-i):
        print (end=" "),
    for j in range(1,i+1):
        print ("%d*%d=%2d"%(i,j,i*j),end="   ")
    print ("")



print("=="*40)

for i in range(1,10):
    for k in range(1,10-i):
        print (end="    "),
    for j in range(1,i+1):
        print ("%d*%d=%2d"%(i,j,i*j),end="   ")
    print ("")


print("=="*40)
for i in range(1,10):
    for k in range(1,i):
        print (end="    "),
    for j in range(1,i+1):
        print ("{:0>}*{:0>}={:<4}".format(i,j,i*j),end="   ")
    print ("")


print("=="*40)
for i in range(1,10):
    for k in range(1,i):
        print (end="    "),
    for j in range(1, 10):
        print ("{:0>}*{:0>}={:<4}".format(i,j,i*j),end="   ")
    print ("")



print("=="*40)
for i in range(1,10):
    for k in range(1,i):
        print (end="    "),
    for j in range(1, 10):
        print ("{:0>}*{:0>}={:<4}".format(i,j,i*j),end="   ")
    print ("")   


print("=="*40)
for i in range(1,10):
    for k in range(1,i):
        print (end="        "),
    for j in range(i, 10):
        print ("{:>}*{:>}={:>2}".format(i,j,i*j),end="  ")
    print ("")


print("=="*40)
for i in range(1,10):
    for k in range(1,10 - i):
        print (end="        ")
    for j in range(1, i+1):
        print ("{:>}*{:>}={:>2}".format(i,j,i*j),end="  ")
    print ("")




print("=="*40)
i = 1
while i < 10:
    k = 1
    while k < (10 -i):
        print (end="        ")
        k += 1
    j = 1
    while j < i+1:
        print ("{:>}*{:>}={:>2}".format (i,j,i*j),end="  ") 
        j += 1
    i+=1
    print("")






print("=="*40)
i = 1
while i < 10:
    k = 1
    while k < i:
        print (end="        ")
        k += 1
    j = i
    while j < 10:
        print ("{:>}*{:>}={:>2}".format (i,j,i*j),end="  ") 
        j += 1
    i+=1
    print("")
    

